package com.tulele.vtool.bus.service.impl;

import com.tulele.vtool.bus.mapper.UserGroupGzhMapper;
import com.tulele.vtool.bus.mapper.UserInfoMapper;
import com.tulele.vtool.bus.service.UserGroupGzhService;
import com.tulele.vtool.model.UserGroupGzh;
import com.tulele.vtool.model.UserGroupOpenId;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统用户(SysUser)表服务实现类
 *
 * @author makejava
 * @since 2021-01-04 16:21:22
 */
@Service("userGroupGzhService")
public class UserGroupGzhServiceImpl implements UserGroupGzhService {

    @Autowired
    private UserGroupGzhMapper userGroupGzhMapper;

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Override
    public UserGroupGzh getUserGroupGzh(String gzhCode) {
        return userGroupGzhMapper.getUserGroupGzh(gzhCode);
    }

    @Override
    public List<UserGroupGzh> getUserGroupGzhs(String groupCode) {
        return userGroupGzhMapper.getUserGroupGzhs(groupCode);
    }

    @Override
    public void addUserGroupOpenId(UserGroupOpenId userGroupOpenId) {
        userGroupGzhMapper.addUserGroupOpenId(userGroupOpenId);
    }

    @Override
    public UserGroupOpenId getUserGroupUserId(String gzhCode, String openId) {
        return userGroupGzhMapper.getUserGroupUserId(gzhCode, openId);
    }

    @Override
    public List<UserGroupOpenId> getUserGroupOpenIds(Integer userId) {
        return userGroupGzhMapper.getUserGroupOpenIds(userId);
    }

    @Override
    public UserGroupOpenId getUserOpenId(String gzhCode, Integer userId) {
        return userGroupGzhMapper.getUserOpenId(gzhCode, userId);
    }

}